import { service } from '@/utils/request';
/**
 * 查看榜单列表
 * @param {string} id 
 * @return 
 */
export function AppGetRankingDetialInfoApi(id : string) {
	return service.get(`/getRankingInfoAll?id=${encodeURIComponent(id)}`);
}
/**
 * 查看投票列表
 * @param {string} id 
 * @return 
 */
export function AppGetvitoInfoApi(id : string) {
	return service.get(`/getvitoInfo?id=${encodeURIComponent(id)}`);
}
/**
 * 查看投票详情
 * @param {string} id 
 * @return 
 */
export function AppGetReviewInfoApi(id : string) {
	return service.get(`/getReviewInfo?id=${encodeURIComponent(id)}`);
}

/**
 * 参加活动
 */
interface creatReviewVo {
	topic : string;
	coverImage : string;
	introduce : string;
	userId : number;
	rankingId : number;
}

export function AppCreatReviewApi(data : creatReviewVo) {
	return service.post('/creatReview', data);
}


/**
 * 进行投票
 */
interface CreateVitoVo {
	userId : number,
	judgeId : number,
	rankingId : number
}
export function AppCreatVitoApi(data : CreateVitoVo) {
	return service.post('/createVito', data);
}